added implicit argument inference and fixed implicit clash