Added calculator function