remove redundant spec code