added parsing size to javascript