added code for dual axes