Refactored with correct libraries
Added fresh library