added form
middle functionality