added parsing logic and printout