remove old duplicated code for specification