added code to deal with different frame_types
Merge pull request #195 from crisien/nit

added code to deal with different frame_types