Added some functionals && security fix