checkpoint with some minor changes spotted while reading through the code