tidied up require code
simplification of requires