followed convention for 'ones' function in same file