modified for size convertion