added js version of #22 (something and somethingBut) and added tests for them