ottimized and add float average