added rational function and some tests