-added normalizeImage in to main loop agein for testing purpose