cleaned old code