add function that type ahead