modified with markku input