removing common code