js func changes, all works fine