A few changes
Working Code