alternate version with methods