enhanced scanner to recocnize empty strings