fixed some errors. still getting typeerror