replace hard coded numbers with BONE_MAX