more modularization. validation works.