updated rem and tell to use prepared sql statements