input checking , fixed delete almost