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