first iteration of a simple calcutaror