Helper functions for points and DB connection