new parsing method
fixed some issues