Make GREEN and refactor code