Adding a method to get last transaction