better parsing structures, cleaner code