move code not related to points to main module