some errors solved, many more to deal with before permissions is functional