finished calc
rewrote in functions for appel