deleted old code from the end