changed api for registering views