created controller helper
finished with passing data to js