refactor code :D