added libraries and fixed bugs
balbal