register implementation