Adding some security and validation