working on admin and code validating functions