seems to be working
changed typecheck