Simplified function apple
Merge pull request #5 from bianconeri23/master

Simplified function apple