need to handle -1 return