getting error that something isnt the right type