MA-1084 #time 30m added function docs and started review