trying to fix repeating command