removed array.remove, use array.splice instead