added multiple channel support