An attempt to simulate Beer-Lambert law