made sure that creating the percentmap is done only once per session, not once per sent byte
added methods to send a photo and to deal with the response
refactoring