working fine before adding db