refactor. clean up