added functions for using form