controller forms code and snap