could be more clean but at the end was good