implemented timestamp for codeWindow iteration, fix variable plane selection logic