implemented code loading