added more functions
added permissions