updated with Madgrick