changed from mysql to postgresql