fix averaging bug. add support for static folders