further work on module. need to finish spec tests and verify functionality