added code to both files