Update: refactor, more readable