X,Y,Z offset support added.