updated structure of files and finished D4