added basic write permission determination