working with objects and math functions