mark calculator error checking