added serializer. fixed uploading. refactoring