working on implemementing math check