added avg power, updated features.m to be more flexible