added difference and without array functions