added js functionality for terminal commands