work for js and active records