added a length method and updated begins with to use length method