added libraries + modularize me, cap'n