finished PA3, static type checker for cool