js methods fixed, mock tests added