removed duplicated routine code

removed duplicated routine code