finished fixing arguments passing to functions from Sequences, it's cleaner and more readable now