Made the amended version to a working state