Removed dublicate code