Use simpler functions
Removed useless local variable