refacor everything again