correct storing of values in table