Commit before revert

This commit is to preserve the current code before I refactor it