created utils.js file and moved rect() to it