why is the compiler giving me void error