register implementation (should work)