making things more general and fixing bugs in call history