calculating method prototype