removes redundant method call
wraps db transaction depending on weather app is in debug mode or not