adding base JS functionality