added enum in and appears to be working, also working on a cleaned up version that uses the single struct arg