Version 1 - parsing input data