changed bounds to begin/end