add GPs to database and getfunction