Updated to logic