books catalog - added new functionality

can be optimized.