Changed naming of params
Added argument checking