Added Logic and Fixed Bugs