improved deserialization and refactored forrst client