added check for values, if there werent any, stuff broke