implemented complex calculator class