Remaking calculator function.