made some code from wet to dry