add chunks code, update OM vs PAM code