last attempt at smartmax not being laggy