Added getItem method and commented state where query