modularization, got some features working