Removed unnecessary code for simplicity.