moved the calc method