implemented js integration
added display option behaviour