Writing function checkTansactions(), will come back after class.