added some error checking
methods implemented but not evaluated