Implemented find triple method
Improved commit method