Removed unnecessary codes, validation bug to be fixed