removed xd and sd functions