implemented testing with security