implemented basic calc functions