- moved inline js function to comply with strict