reorganizing and added typechecking
operators now ready for multiple types