cleaned up agent form implementation, initial working version