added helper methods to application controller