adding support for NIO applications