add function
fixes bug regarding status; refactoring
add some shitty coded Authn/Authz checks