added proper argument handling