debug and updating