refactored

using list.remove