Common js methods