fixed so transaction is added into db... and created new method