added alert box and sanitazeation for empty inputs