setup and registration work