added functions and jQuery