rewise the code