refactor code syntax