Made it a function for basic calc