fix cal() and various errors I had added