Reduced some code