fix a little
fix ag
modularized