Changed functions to methods\nWrote the encrypt block method