calc interest impl