added more functionality alternate version