fixed bugs & finalized