Initial commit of working function