Initial Code with some changes