fixed tipos and tested code working