now works with params from sys arg