added multi resolution support