preperations for adding register function