Deleted duplicated code