separate to autobeats.js