Added isEmpty and isFull methods