Why reinvent the wheel?
Added new function and other things