cleanup & revert old code