Added custom javascript functions in spec