I'm not sure if "else" is ideal... so what if res is nil?