fixed typo in warning message
added AVMAX example
first working version of AVMAX algorithm