better prompt handling