fixed segfault by requiring args