fixed issue in grow() where n and j would not reset. Also remove() now returns the value that is removed from the array