merged js functions

integrated phenomenon checking