reduced code by use of methods.h