public boolean save(ArrayList<Layer> drawings, String name) {
        //todo

        //open the file
        try {
            File file = new File(name + "." + Variables.EXTENSION);

            // if file doesn't exists, then create it
            if (!file.exists()) {
                file.createNewFile();
            } else {
                int seq = 0;
                while (file.exists()) {
                    seq++;
                    file = new File(name + "(" + seq + ")." + Variables.EXTENSION);
                }
            }

            FileOutputStream saveFile = new FileOutputStream(file);
            ObjectOutputStream saveObject = new ObjectOutputStream(saveFile);

            for (Layer item : drawings) {

                saveObject.writeObject(item);

            }
            saveObject.close();

        } catch (Exception e) {
            e.printStackTrace();
            return false;
        }
        return true;

    }