First version of avop script