new functions in js for a better display