Changes made to resue some code + spacing