back to js. improved shake tolerance