Added more logic, still no good idea on how to move forward.