code with all old features