added calc functions
deleted some stuff