reworking code to streamline it
reworking code to streamline it