changed for postgre DB