reorder functions and attrs
create photo object, partial refactor