added assertion to check num args