added more functionality/security