ADDED fixed code