First version of the functions for this week programming assignment, they work as spected so maybe no future versions will be commited.