modified js files and main controller