updated to support fig