some final improvements