added coverage generation & improved tests