added ones padding on X in computecost