add Permission class
add tests for Permission