fixed param names; added param marginSize