Cleaned and simplified
added example