roughly done with photo upload; needs futher refine though