Adding function to app