refactoring point and random modules