removed an unused method from DataController and moved some code therein around