18 functions done
final version