calculator method is updated