add prev and next functions
compress js further