code works - without function; function to be added next