Initialize function check if values are in order and unit tests