improve the procedure