better implementation of the item method