fixed parse method to include multiple signals, works for very large input