extracting some methods to be global ones for all the apps to use