rebased with last updates