Slightly simpler code