added scanf-based converter