implemented encrypt program, still with errors