Removed somehow duplicated code