some minor refactory, removing splat to simplify the code a bit