Added JoinMP and helper functions