register first before doing anything