disabled buggy avg function