changed form function