code refixed and working