replace deck dependency with single function