modifying code for readthedocs generation