Replaced entire code