fixed photo upload and started to change structure