methods updated to return a hash containing result of operation