Wrote ina new function