Added function after validation