making allocation algo with method puy