added method generation + tests #8