small updates to logic