modified form implementation to fix page duplication error