Removed repeating code