added security and parse js