move naive evaluation loop into separate module