changed to function call instead on relying on method