Implemented working program.