changed function declarations to ngmin protection