Added code according to tutoria