cleaned up calc