cleaning wrapper code