endpoint resolution by module

fix #53
tests ok