Updated code

added functionality and updates style again.