Thin in dev
Added function to do calculations