added logic for converting back item