sort of works; math needs work