FIX: use return in javascript