Working custom adapter