temporary solution for issue #7, moved the require into the method. Yep, this is a bad idea. Will complete a refactor later