Merged code from dropbox