Better logic flow