ugly code deletes (but not reload page)
ugly reload
refactored to some functions