some updates
begin refactoring