code to version 1 portfolio