organize code better