logic refined