setup permissions and stuff