fixed some bad types, need to go for polymorphism