Remove shadow code repetition
Merge pull request #5 from romanroibu/master

Remove shadow code repetition